{"ast":null,"code":"import { roundedArrow } from './roundedArrow';\nfunction connectArrowCls(classList) {\n  let showArrowCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  return classList.map(cls => `${showArrowCls}${cls}`).join(',');\n}\nexport const MAX_VERTICAL_CONTENT_RADIUS = 8;\nexport function getArrowOffset(options) {\n  const maxVerticalContentRadius = MAX_VERTICAL_CONTENT_RADIUS;\n  const {\n    sizePopupArrow,\n    contentRadius,\n    borderRadiusOuter,\n    limitVerticalRadius\n  } = options;\n  const arrowInnerOffset = sizePopupArrow / 2 - Math.ceil(borderRadiusOuter * (Math.sqrt(2) - 1));\n  const dropdownArrowOffset = (contentRadius > 12 ? contentRadius + 2 : 12) - arrowInnerOffset;\n  const dropdownArrowOffsetVertical = limitVerticalRadius ? maxVerticalContentRadius - arrowInnerOffset : dropdownArrowOffset;\n  return {\n    dropdownArrowOffset,\n    dropdownArrowOffsetVertical\n  };\n}\nexport default function getArrowStyle(token, options) {\n  const {\n    componentCls,\n    sizePopupArrow,\n    marginXXS,\n    borderRadiusXS,\n    borderRadiusOuter,\n    boxShadowPopoverArrow\n  } = token;\n  const {\n    colorBg,\n    showArrowCls,\n    contentRadius = token.borderRadiusLG,\n    limitVerticalRadius\n  } = options;\n  const {\n    dropdownArrowOffsetVertical,\n    dropdownArrowOffset\n  } = getArrowOffset({\n    sizePopupArrow,\n    contentRadius,\n    borderRadiusOuter,\n    limitVerticalRadius\n  });\n  const dropdownArrowDistance = sizePopupArrow / 2 + marginXXS;\n  return {\n    [componentCls]: {\n      // ============================ Basic ============================\n      [`${componentCls}-arrow`]: [Object.assign(Object.assign({\n        position: 'absolute',\n        zIndex: 1,\n        display: 'block'\n      }, roundedArrow(sizePopupArrow, borderRadiusXS, borderRadiusOuter, colorBg, boxShadowPopoverArrow)), {\n        '&:before': {\n          background: colorBg\n        }\n      })],\n      // ========================== Placement ==========================\n      // Here handle the arrow position and rotate stuff\n      // >>>>> Top\n      [[`&-placement-top ${componentCls}-arrow`, `&-placement-topLeft ${componentCls}-arrow`, `&-placement-topRight ${componentCls}-arrow`].join(',')]: {\n        bottom: 0,\n        transform: 'translateY(100%) rotate(180deg)'\n      },\n      [`&-placement-top ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: 'translateX(-50%) translateY(100%) rotate(180deg)'\n      },\n      [`&-placement-topLeft ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      [`&-placement-topRight ${componentCls}-arrow`]: {\n        right: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      // >>>>> Bottom\n      [[`&-placement-bottom ${componentCls}-arrow`, `&-placement-bottomLeft ${componentCls}-arrow`, `&-placement-bottomRight ${componentCls}-arrow`].join(',')]: {\n        top: 0,\n        transform: `translateY(-100%)`\n      },\n      [`&-placement-bottom ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: `translateX(-50%) translateY(-100%)`\n      },\n      [`&-placement-bottomLeft ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      [`&-placement-bottomRight ${componentCls}-arrow`]: {\n        right: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      // >>>>> Left\n      [[`&-placement-left ${componentCls}-arrow`, `&-placement-leftTop ${componentCls}-arrow`, `&-placement-leftBottom ${componentCls}-arrow`].join(',')]: {\n        right: {\n          _skip_check_: true,\n          value: 0\n        },\n        transform: 'translateX(100%) rotate(90deg)'\n      },\n      [`&-placement-left ${componentCls}-arrow`]: {\n        top: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: 'translateY(-50%) translateX(100%) rotate(90deg)'\n      },\n      [`&-placement-leftTop ${componentCls}-arrow`]: {\n        top: dropdownArrowOffsetVertical\n      },\n      [`&-placement-leftBottom ${componentCls}-arrow`]: {\n        bottom: dropdownArrowOffsetVertical\n      },\n      // >>>>> Right\n      [[`&-placement-right ${componentCls}-arrow`, `&-placement-rightTop ${componentCls}-arrow`, `&-placement-rightBottom ${componentCls}-arrow`].join(',')]: {\n        left: {\n          _skip_check_: true,\n          value: 0\n        },\n        transform: 'translateX(-100%) rotate(-90deg)'\n      },\n      [`&-placement-right ${componentCls}-arrow`]: {\n        top: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: 'translateY(-50%) translateX(-100%) rotate(-90deg)'\n      },\n      [`&-placement-rightTop ${componentCls}-arrow`]: {\n        top: dropdownArrowOffsetVertical\n      },\n      [`&-placement-rightBottom ${componentCls}-arrow`]: {\n        bottom: dropdownArrowOffsetVertical\n      },\n      // =========================== Offset ============================\n      // Offset the popover to account for the dropdown arrow\n      // >>>>> Top\n      [connectArrowCls([`&-placement-topLeft`, `&-placement-top`, `&-placement-topRight`], showArrowCls)]: {\n        paddingBottom: dropdownArrowDistance\n      },\n      // >>>>> Bottom\n      [connectArrowCls([`&-placement-bottomLeft`, `&-placement-bottom`, `&-placement-bottomRight`], showArrowCls)]: {\n        paddingTop: dropdownArrowDistance\n      },\n      // >>>>> Left\n      [connectArrowCls([`&-placement-leftTop`, `&-placement-left`, `&-placement-leftBottom`], showArrowCls)]: {\n        paddingRight: {\n          _skip_check_: true,\n          value: dropdownArrowDistance\n        }\n      },\n      // >>>>> Right\n      [connectArrowCls([`&-placement-rightTop`, `&-placement-right`, `&-placement-rightBottom`], showArrowCls)]: {\n        paddingLeft: {\n          _skip_check_: true,\n          value: dropdownArrowDistance\n        }\n      }\n    }\n  };\n}","map":{"version":3,"names":["roundedArrow","connectArrowCls","classList","showArrowCls","arguments","length","undefined","map","cls","join","MAX_VERTICAL_CONTENT_RADIUS","getArrowOffset","options","maxVerticalContentRadius","sizePopupArrow","contentRadius","borderRadiusOuter","limitVerticalRadius","arrowInnerOffset","Math","ceil","sqrt","dropdownArrowOffset","dropdownArrowOffsetVertical","getArrowStyle","token","componentCls","marginXXS","borderRadiusXS","boxShadowPopoverArrow","colorBg","borderRadiusLG","dropdownArrowDistance","Object","assign","position","zIndex","display","background","bottom","transform","left","_skip_check_","value","right","top","paddingBottom","paddingTop","paddingRight","paddingLeft"],"sources":["/data/messenger.client/node_modules/antd/es/style/placementArrow.js"],"sourcesContent":["import { roundedArrow } from './roundedArrow';\nfunction connectArrowCls(classList) {\n  let showArrowCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  return classList.map(cls => `${showArrowCls}${cls}`).join(',');\n}\nexport const MAX_VERTICAL_CONTENT_RADIUS = 8;\nexport function getArrowOffset(options) {\n  const maxVerticalContentRadius = MAX_VERTICAL_CONTENT_RADIUS;\n  const {\n    sizePopupArrow,\n    contentRadius,\n    borderRadiusOuter,\n    limitVerticalRadius\n  } = options;\n  const arrowInnerOffset = sizePopupArrow / 2 - Math.ceil(borderRadiusOuter * (Math.sqrt(2) - 1));\n  const dropdownArrowOffset = (contentRadius > 12 ? contentRadius + 2 : 12) - arrowInnerOffset;\n  const dropdownArrowOffsetVertical = limitVerticalRadius ? maxVerticalContentRadius - arrowInnerOffset : dropdownArrowOffset;\n  return {\n    dropdownArrowOffset,\n    dropdownArrowOffsetVertical\n  };\n}\nexport default function getArrowStyle(token, options) {\n  const {\n    componentCls,\n    sizePopupArrow,\n    marginXXS,\n    borderRadiusXS,\n    borderRadiusOuter,\n    boxShadowPopoverArrow\n  } = token;\n  const {\n    colorBg,\n    showArrowCls,\n    contentRadius = token.borderRadiusLG,\n    limitVerticalRadius\n  } = options;\n  const {\n    dropdownArrowOffsetVertical,\n    dropdownArrowOffset\n  } = getArrowOffset({\n    sizePopupArrow,\n    contentRadius,\n    borderRadiusOuter,\n    limitVerticalRadius\n  });\n  const dropdownArrowDistance = sizePopupArrow / 2 + marginXXS;\n  return {\n    [componentCls]: {\n      // ============================ Basic ============================\n      [`${componentCls}-arrow`]: [Object.assign(Object.assign({\n        position: 'absolute',\n        zIndex: 1,\n        display: 'block'\n      }, roundedArrow(sizePopupArrow, borderRadiusXS, borderRadiusOuter, colorBg, boxShadowPopoverArrow)), {\n        '&:before': {\n          background: colorBg\n        }\n      })],\n      // ========================== Placement ==========================\n      // Here handle the arrow position and rotate stuff\n      // >>>>> Top\n      [[`&-placement-top ${componentCls}-arrow`, `&-placement-topLeft ${componentCls}-arrow`, `&-placement-topRight ${componentCls}-arrow`].join(',')]: {\n        bottom: 0,\n        transform: 'translateY(100%) rotate(180deg)'\n      },\n      [`&-placement-top ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: 'translateX(-50%) translateY(100%) rotate(180deg)'\n      },\n      [`&-placement-topLeft ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      [`&-placement-topRight ${componentCls}-arrow`]: {\n        right: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      // >>>>> Bottom\n      [[`&-placement-bottom ${componentCls}-arrow`, `&-placement-bottomLeft ${componentCls}-arrow`, `&-placement-bottomRight ${componentCls}-arrow`].join(',')]: {\n        top: 0,\n        transform: `translateY(-100%)`\n      },\n      [`&-placement-bottom ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: `translateX(-50%) translateY(-100%)`\n      },\n      [`&-placement-bottomLeft ${componentCls}-arrow`]: {\n        left: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      [`&-placement-bottomRight ${componentCls}-arrow`]: {\n        right: {\n          _skip_check_: true,\n          value: dropdownArrowOffset\n        }\n      },\n      // >>>>> Left\n      [[`&-placement-left ${componentCls}-arrow`, `&-placement-leftTop ${componentCls}-arrow`, `&-placement-leftBottom ${componentCls}-arrow`].join(',')]: {\n        right: {\n          _skip_check_: true,\n          value: 0\n        },\n        transform: 'translateX(100%) rotate(90deg)'\n      },\n      [`&-placement-left ${componentCls}-arrow`]: {\n        top: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: 'translateY(-50%) translateX(100%) rotate(90deg)'\n      },\n      [`&-placement-leftTop ${componentCls}-arrow`]: {\n        top: dropdownArrowOffsetVertical\n      },\n      [`&-placement-leftBottom ${componentCls}-arrow`]: {\n        bottom: dropdownArrowOffsetVertical\n      },\n      // >>>>> Right\n      [[`&-placement-right ${componentCls}-arrow`, `&-placement-rightTop ${componentCls}-arrow`, `&-placement-rightBottom ${componentCls}-arrow`].join(',')]: {\n        left: {\n          _skip_check_: true,\n          value: 0\n        },\n        transform: 'translateX(-100%) rotate(-90deg)'\n      },\n      [`&-placement-right ${componentCls}-arrow`]: {\n        top: {\n          _skip_check_: true,\n          value: '50%'\n        },\n        transform: 'translateY(-50%) translateX(-100%) rotate(-90deg)'\n      },\n      [`&-placement-rightTop ${componentCls}-arrow`]: {\n        top: dropdownArrowOffsetVertical\n      },\n      [`&-placement-rightBottom ${componentCls}-arrow`]: {\n        bottom: dropdownArrowOffsetVertical\n      },\n      // =========================== Offset ============================\n      // Offset the popover to account for the dropdown arrow\n      // >>>>> Top\n      [connectArrowCls([`&-placement-topLeft`, `&-placement-top`, `&-placement-topRight`], showArrowCls)]: {\n        paddingBottom: dropdownArrowDistance\n      },\n      // >>>>> Bottom\n      [connectArrowCls([`&-placement-bottomLeft`, `&-placement-bottom`, `&-placement-bottomRight`], showArrowCls)]: {\n        paddingTop: dropdownArrowDistance\n      },\n      // >>>>> Left\n      [connectArrowCls([`&-placement-leftTop`, `&-placement-left`, `&-placement-leftBottom`], showArrowCls)]: {\n        paddingRight: {\n          _skip_check_: true,\n          value: dropdownArrowDistance\n        }\n      },\n      // >>>>> Right\n      [connectArrowCls([`&-placement-rightTop`, `&-placement-right`, `&-placement-rightBottom`], showArrowCls)]: {\n        paddingLeft: {\n          _skip_check_: true,\n          value: dropdownArrowDistance\n        }\n      }\n    }\n  };\n}"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,eAAe,CAACC,SAAS,EAAE;EAClC,IAAIC,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